package com.ruoyi.tea.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tea.mapper.TeaOrderMapper;
import com.ruoyi.tea.domain.TeaOrder;
import com.ruoyi.tea.service.ITeaOrderService;

/**
 * 订单信息Service业务层处理
 * 
 * @author hmx
 * @date 2023-03-18
 */
@Service
public class TeaOrderServiceImpl implements ITeaOrderService 
{
    @Autowired
    private TeaOrderMapper teaOrderMapper;

    /**
     * 查询订单信息
     * 
     * @param orderId 订单信息主键
     * @return 订单信息
     */
    @Override
    public TeaOrder selectTeaOrderByOrderId(Long orderId)
    {
        return teaOrderMapper.selectTeaOrderByOrderId(orderId);
    }

    /**
     * 查询订单信息列表
     * 
     * @param teaOrder 订单信息
     * @return 订单信息
     */
    @Override
    public List<TeaOrder> selectTeaOrderList(TeaOrder teaOrder)
    {
        return teaOrderMapper.selectTeaOrderList(teaOrder);
    }

    /**
     * 查询订单销量信息echarts列表
     *
     * @param teaOrder 订单信息
     * @return 订单信息
     */
    @Override
    public List<TeaOrder> selectBuyOrderList(TeaOrder teaOrder){return teaOrderMapper.selectBuyOrderList(teaOrder);}

    /**
     * 新增订单信息
     * 
     * @param teaOrder 订单信息
     * @return 结果
     */
    @Override
    public int insertTeaOrder(TeaOrder teaOrder)
    {
        return teaOrderMapper.insertTeaOrder(teaOrder);
    }

    /**
     * 修改订单信息
     * 
     * @param teaOrder 订单信息
     * @return 结果
     */
    @Override
    public int updateTeaOrder(TeaOrder teaOrder)
    {
        return teaOrderMapper.updateTeaOrder(teaOrder);
    }

    /**
     * 批量删除订单信息
     * 
     * @param orderIds 需要删除的订单信息主键
     * @return 结果
     */
    @Override
    public int deleteTeaOrderByOrderIds(Long[] orderIds)
    {
        return teaOrderMapper.deleteTeaOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单信息信息
     * 
     * @param orderId 订单信息主键
     * @return 结果
     */
    @Override
    public int deleteTeaOrderByOrderId(Long orderId)
    {
        return teaOrderMapper.deleteTeaOrderByOrderId(orderId);
    }
}
